package com.example.vehiclemanagesystem.service.Impl;

import com.example.vehiclemanagesystem.dao.UserDao;
import com.example.vehiclemanagesystem.entity.User;
import com.example.vehiclemanagesystem.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.websocket.OnError;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserDao userDao;

    @Override
    public User selectUserByUsername(String name){
        return userDao.selectUserByUsername(name);
    }

    @Override
    public User selectUserByUserId(String userId) {
        return userDao.selectUserByUserId(userId);
    }

    @Override
    public void registerNewUser(User user){
        userDao.registerNewUser(user);
    }

    @Override
    public void setUserNow(User user) {
        userDao.setUserNow(user);
    }


}
